package com.yunxi.service.localService.impl.otd;

import com.yunxi.core.service.ServiceImplPlus;
import com.yunxi.core.util.BeanTools;
import com.yunxi.dao.otd.OtdOrderMonthMapper;
import com.yunxi.model.otd.OtdOrderMonth;
import com.yunxi.otd.pojo.OtdMonthPlanVO;
import com.yunxi.otd.pojo.OtdOrderMonthQueryVO;
import com.yunxi.service.localService.otd.OtdOrderMonthService;
import java.util.Map;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 月排产需求订单 服务实现类
 * </p>
 *
 * @author XUQI
 * @since 2019-07-15
 */
@Service
public class OtdOrderMonthServiceImpl extends ServiceImplPlus<OtdOrderMonthMapper, OtdOrderMonth> implements
    OtdOrderMonthService {

    /**
     * 分页查询月计划
     *
     * @param queryVO 查询VO
     * @return PageInfo
     */
    @Override
    public OtdMonthPlanVO findMonthPlan(OtdOrderMonthQueryVO queryVO) {
        Map map = BeanTools.bean2map(queryVO);
//        map.put("pageNum", pageNum);
//        map.put("pageSize", pageSize);
        OtdMonthPlanVO data = new OtdMonthPlanVO();
        data.setTotal(baseMapper.findCirOrderScheduleCount(map));
        data.setList(baseMapper.selectMonthPlan(map));
        return data;
    }
}
